using QQZiFramework;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
namespace DemoConsole
{
    [DBTable(TableName = "X5_wsNews")]
    public class NewsItem : IDBEntity
    {
        [DBField(Usage = DBFieldUsage.PrimaryKey,FieldName = "AutoCode")]
        public int Id { get; set; }
        /// <summary>
        /// 标题
        /// </summary>
        [DBField(FieldName = "STitle")]
        public string Title { get; set; }

        /// <summary>
        /// 栏目编号
        /// </summary>
        [DBField(FieldName = "SClsCode")]

        public string ClsCode { get; set; }

        /// <summary>
        /// 内容
        /// </summary>
        [DBField(FieldName = "SContent")]
        public string Content { get; set; }

        /// <summary>
        /// 来源
        /// </summary>
        [DBField(FieldName = "SSource")]
        public string Source { get; set; }

        /// <summary>
        /// 简述
        /// </summary>
        [DBField(FieldName = "SSummary")]
        public string Summary { get; set; }

        /// <summary>
        /// 作者
        /// </summary>
        [DBField( FieldName = "SAuthor")]
        public string Author { get; set; }

        /// <summary>
        /// 发布时间
        /// </summary>
        [JsonConverter(typeof(UnixTimeConverter))]
        [DBField( FieldName = "DTimeAdd")]
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 栏目名称
        /// </summary>
        [DBField(Usage =DBFieldUsage.NoField, FieldName = "SClsName")]
        public string ClsName { get; set; }

        public int lParentCode { get; set; }

        /// <summary>
        /// 点击数
        /// </summary>
        [DefaultValue(0)]
        public int lHit { get; set; }

        //public string sSource { get; set; }

        /// <summary>
        /// 回复数
        /// </summary>
        [DefaultValue(DefaultNullValue)]
        [DBField(FieldName = "lComment")]
        public string Comment { get; set; }

        public string STag { get; set; }
        public int lCanCopy { get; set; }


        ///// <summary>
        ///// 点赞数量
        ///// </summary>
        //[DefaultValue(DefaultNullValue)]
        //public int lZan { get; set; }

        /// <summary>
        /// 标题图片
        /// </summary>
        [DBField(FieldName = "STitleImg")]
        public string TitleImg { get; set; }


        //报装排序
        [DBField(FieldName = "SortIndex")]
        public int SortIndex { get; set; }
    }
}